package com.ls.common.baseClass;

import com.ls.base.baseClass.backStage.BaseController;
import com.ls.modules.sys.dal.jpa.entity.SysUserEntity;
import org.apache.shiro.SecurityUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * @author: xiaosu
 * @date: 2018-09-17  13:04
 */
public  abstract class BackStageController  extends BaseController {

    protected Logger logger = LoggerFactory.getLogger(getClass());

    protected SysUserEntity getUser() {
        return (SysUserEntity) SecurityUtils.getSubject().getPrincipal();
    }

    protected Long getUserId() {
        return getUser().getId();
    }
}
